package com.puny.mvc.views
{
	import flash.events.Event;
	import flash.events.IOErrorEvent;
	import flash.events.TimerEvent;
	import flash.utils.Timer;
	
	public class CommonView extends View
	{
		public function CommonView(src:Object=null)
		{
			super(src);
		}

		override protected function setup():void {
			getMovieClip("HenryRun");
			getMovieClip("JennyRun",false);
		}
		
		override protected function beforeReady():void {
			var timer:Timer = new Timer(500,1);
			timer.addEventListener(TimerEvent.TIMER, timerHandler);
			timer.start();
		}
		
		private function timerHandler(event:Event):void {
			complete();
		}
		
		override protected function errorHandler(event:IOErrorEvent):void {
			try {
				super.errorHandler(event);
			} catch(e:Error) {
				trace(e);
			}
		}	
	}
}